#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
    long double x,jc,e;
    int n;
    e=jc=1;
    cin >> x >> n;
    if(x == 0) { printf("%.6Lf", e); return 0;}
    const long double x_x = x;
    if(x <= 0 || n <=0){
        cout << "error";
        return 0;
    }
    for(int i = 1;i <= n;i++){
        jc = jc*i;
        e = e + x/jc;
        x*=x_x;
    }

    printf("%.6Lf",e);
    return 0;
}
